<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserInfoTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_info', function (Blueprint $table) {
            $table -> increments('id')       ->comment('标识');
            $table -> integer('user_id')     ->default(0)->comment('关联用户id');
            $table -> integer('photo_id')    ->default(0)->comment('头像图片id');
            $table -> string('nickname')     ->nullable()->comment('昵称');
            $table -> string('realname')     ->nullable()->comment('真实姓名');
            $table -> integer('sex')         ->default(0)->comment('性别');
            $table -> string('qq')           ->nullable()->comment('QQ号');
            $table -> string('province')     ->nullable()->comment('省');
            $table -> string('city')         ->nullable()->comment('市');
            $table -> string('area')         ->nullable()->comment('区');
            $table -> softDeletes();
            $table -> timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
